<?php
require_once '../config.php';

if(isset($_POST['login'])) {
	if(access::login('admin', 'admin')) {
		$gourl = empty($_SERVER['HTTP_REFERER']) ? './index.php' : $_SERVER['HTTP_REFERER'];
		showMsg('登录成功', $gourl);
	}else showMsg('登录失败', './login.php'); 
}else{
	$pageName = pageName();
	include './templates/login.html';
}
?>